{% extends "base.html" %}

{% block title %}Django Notes{% endblock %}

{% block content %}
<h1>Django Notes</h1>

<p>This application exists to demonstrate django-openidauth. You can <a href="/register/">sign up for an account</a> using a regular username and password or an OpenID - once you have signed up you can publish notes to the world.</p>

{% if user.is_anonymous %}
<p>Got an account? <a href="/login/">Sign in here</a>.</p>
{% endif %}
<h2>Recent notes</h2>
{% if recent_notes %}
<ul>
	{% for note in recent_notes %}
	<li><a href="/note/{{ note.id }}/">Note {{ note.id }}</a>, by 
	    {% ifequal user note.user %}
    	    you
	    {% else %}
    	    {{ note.user.username|escape }}
    	{% endifequal %}
	</li>
	{% endfor %}
{% else %}
<p>No one has written any notes yet.</p>
{% if user.is_authenticated %}
<p>Why not <a href="/note/create/">write one</a>?</p>
{% endif %}
{% endif %}

{% endblock %}